package cn.doitedu.utils;

import org.apache.flink.table.functions.ScalarFunction;
import ch.hsr.geohash.GeoHash;

public class GeohashUDF extends ScalarFunction {
    public String eval(Double lat,Double lng){
        String s = null;
        try {
            s = GeoHash.geoHashStringWithCharacterPrecision(lat, lng, 5);
        }catch (Exception e){
            e.printStackTrace();
        }
        return s;
    }
}
